Silence more compiler warnings
authorMatthias Clasen <mclasen@redhat.com>
Sat, 12 Feb 2011 12:59:25 +0000 (07:59 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 12 Feb 2011 13:01:51 +0000 (08:01 -0500)
tests/testcombo.c
tests/testexpand.c
tests/testfilechooser.c
tests/testgtk.c
tests/testnouiprint.c
tests/testrecentchooser.c

index 0f7d5cee3da73131f1da7853f02095c3954c3916..b1bb7f94ba15011d55ed992af1ad7cc2f5e6fed3 100644 (file)
@@ -35,7 +35,6 @@ create_color_pixbuf (const char *color)
 
         int x;
         int num;
-        int rowstride;
         guchar *pixels, *p;
 
         if (!gdk_color_parse (color, &col))
@@ -45,7 +44,6 @@ create_color_pixbuf (const char *color)
                                  FALSE, 8,
                                  16, 16);
 
-        rowstride = gdk_pixbuf_get_rowstride (pixbuf);
         p = pixels = gdk_pixbuf_get_pixels (pixbuf);
 
         num = gdk_pixbuf_get_width (pixbuf) *
index e7f0d99cd595522ccdcaf39bc48a45b201eaca03..801b60e7ceffb8127d2941f322a6d220c453356d 100644 (file)
@@ -26,11 +26,6 @@ static void
 on_toggle_hexpand (GtkToggleButton *toggle,
                    void            *data)
 {
-  GtkWidget *parent;
-
-  /* get the event box with color set on it */
-  parent = gtk_widget_get_parent (gtk_widget_get_parent (GTK_WIDGET (toggle)));
-
   g_object_set (toggle,
                 "hexpand", gtk_toggle_button_get_active (toggle),
                 NULL);
@@ -40,11 +35,6 @@ static void
 on_toggle_vexpand (GtkToggleButton *toggle,
                    void            *data)
 {
-  GtkWidget *parent;
-
-  /* get the event box with color set on it */
-  parent = gtk_widget_get_parent (gtk_widget_get_parent (GTK_WIDGET (toggle)));
-
   g_object_set (toggle,
                 "vexpand", gtk_toggle_button_get_active (toggle),
                 NULL);
index dcefbc1eb30a378be9ec441ce986990f6bb5d65a..b64c381e4e58e32fb4923242dae3a8ab0a3a1f0b 100644 (file)
@@ -481,7 +481,6 @@ main (int argc, char **argv)
   GtkWidget *vbbox;
   GtkWidget *button;
   GtkWidget *dialog;
-  GtkWidget *prop_editor;
   GtkWidget *extra;
   GtkFileFilter *filter;
   GtkWidget *preview_vbox;
@@ -640,7 +639,7 @@ main (int argc, char **argv)
 
   /* Extra controls for manipulating the test environment
    */
-  prop_editor = create_prop_editor (G_OBJECT (dialog), GTK_TYPE_FILE_CHOOSER);
+  create_prop_editor (G_OBJECT (dialog), GTK_TYPE_FILE_CHOOSER);
 
   control_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
 
index def6ded012ed855a90c1b034697c15d54bc8a9fa..b704c6f20ecd487c5b6d7d280cdb53fd5b1bc50e 100644 (file)
@@ -8841,7 +8841,6 @@ snapshot_widget (GtkButton *button,
 {
   GtkWidget *widget = GTK_WIDGET (button);
   GdkDevice *device;
-  gint failure;
 
   device = gtk_get_current_event_device ();
   if (device == NULL)
@@ -8856,13 +8855,13 @@ snapshot_widget (GtkButton *button,
     data->cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget),
                                               GDK_TARGET);
 
-  failure = gdk_device_grab (device,
-                             gtk_widget_get_window (widget),
-                             GDK_OWNERSHIP_APPLICATION,
-                            TRUE,
-                            GDK_BUTTON_RELEASE_MASK,
-                            data->cursor,
-                            GDK_CURRENT_TIME);
+  gdk_device_grab (device,
+                   gtk_widget_get_window (widget),
+                   GDK_OWNERSHIP_APPLICATION,
+                  TRUE,
+                  GDK_BUTTON_RELEASE_MASK,
+                  data->cursor,
+                  GDK_CURRENT_TIME);
 
   g_signal_connect (button, "event",
                    G_CALLBACK (snapshot_widget_event), data);
index 0dcc489a8d85d86be6e6c578c6d35ad007407fae..bde1a02793e6c1641751010c6d24cf1977f6d45f 100644 (file)
@@ -71,7 +71,7 @@ draw_page (GtkPrintOperation *operation,
   /* Font Fill */
   cairo_set_source_rgb (cr, 0, 0.0, 1.0);
   cairo_fill (cr);
-  
+
   g_object_unref (layout);
 }
 
@@ -79,24 +79,20 @@ draw_page (GtkPrintOperation *operation,
 int
 main (int argc, char **argv)
 {
-  GMainLoop *loop;
   GtkPrintOperation *print;
-  GtkPrintOperationResult res;
   GtkPrintSettings *settings;
 
-  g_type_init (); 
-  loop = g_main_loop_new (NULL, TRUE);
+  g_type_init ();
 
   settings = gtk_print_settings_new ();
   /* gtk_print_settings_set_printer (settings, "printer"); */
-  
+
   print = gtk_print_operation_new ();
   gtk_print_operation_set_print_settings (print, settings);
   gtk_print_operation_set_n_pages (print, 1);
   gtk_print_operation_set_unit (print, GTK_UNIT_MM);
   g_signal_connect (print, "draw_page", G_CALLBACK (draw_page), NULL);
-  res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT, NULL, NULL);
+  gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT, NULL, NULL);
 
   return 0;
 }
index 4761583b03e1d31481de49806d5d3b34941c1b1d..d31f0f0ab1eb950528bb05e50fc09ea78dc16da3 100644 (file)
@@ -111,7 +111,6 @@ main (int   argc,
   GtkWidget *vbbox;
   GtkWidget *button;
   GtkWidget *dialog;
-  GtkWidget *prop_editor;
   GtkRecentFilter *filter;
   gint i;
   gboolean multiple = FALSE;
@@ -172,7 +171,7 @@ main (int   argc,
 
   gtk_widget_show_all (dialog);
 
-  prop_editor = create_prop_editor (G_OBJECT (dialog), GTK_TYPE_RECENT_CHOOSER);
+  create_prop_editor (G_OBJECT (dialog), GTK_TYPE_RECENT_CHOOSER);
 
   control_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);